﻿using AutoMapper;
using ZGL.Api.Entity;
using ZGL.Api.Models.dto;
using ZGL.Api.Models.vo;

namespace ZGL.Api.Mapping
{
    public class MappingProfile : Profile
    {
        public MappingProfile()
        {
            //用户
            CreateMap<SysUser, SysUserVo>();
            CreateMap<UserAddDto, SysUser>();
            CreateMap<UserPutDto, SysUser>();
            //菜单
            CreateMap<SysMenuAuthority, SysMenuAuthorityVo>();
            CreateMap<MenuPutDto, SysMenuAuthority>();
            CreateMap<MenuAddDto, SysMenuAuthority>();
            //角色
            CreateMap<SysRole, SysRoleVo>();
            CreateMap<RolePutDto, SysRole>();
            CreateMap<RoleAddDto, SysRole>();
        }
    }
}
